package beliberda;

import java.util.Date;

import javax.persistence.Id;

import com.googlecode.objectify.annotation.Entity;
import com.googlecode.objectify.annotation.Index;
import com.googlecode.objectify.annotation.Unindex;

import account.Account;

@Entity@Unindex
public class History {

	@Id
	private long id;
	@Index
	private Account author;
	@Index
	private String genre;
	private String title;
	private Date date;
	private int total;
	@Index
	private Comment comm;
	private int charlimit;
	
	public History(){}
	
	public History(Account acc, String genre, int limit, String title){
		this.setAuthor(acc);
		this.setGenre(genre);
		this.setTotal(0);
		this.setCharlimit(limit);
		this.setTitle(title);
	}

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public Account getAuthor() {
		return author;
	}

	public void setAuthor(Account author) {
		this.author = author;
	}

	public String getGenre() {
		return genre;
	}

	public void setGenre(String genre) {
		this.genre = genre;
	}

	public int getTotal() {
		return total;
	}

	public void setTotal(int total) {
		this.total = total;
	}

	public Comment getComm() {
		return comm;
	}

	public void setComm(Comment comm) {
		this.comm = comm;
	}

	public int getCharlimit() {
		return charlimit;
	}

	public void setCharlimit(int charlimit) {
		this.charlimit = charlimit;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}
	
}




